home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
PIL
/
ImageGrab.pyo
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2008-10-13
|
942b
|
32 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
import Image
try:
grabber = Image.core.grabscreen
except AttributeError:
import _grabscreen
grabber = _grabscreen.grab
def grab(bbox = None):
(size, data) = grabber()
im = Image.fromstring('RGB', size, data, 'raw', 'BGR', size[0] * 3 + 3 & -4, -1)
if bbox:
im = im.crop(bbox)
return im
def grabclipboard():
debug = 0
data = Image.core.grabclipboard(debug)
if Image.isStringType(data):
import BmpImagePlugin as BmpImagePlugin
import StringIO as StringIO
return BmpImagePlugin.DibImageFile(StringIO.StringIO(data))
return data